#ifndef MAINWIDGET_H
#define MAINWIDGET_H

#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QTranslator>
#include "settingdialog.h"

class MainWidget : public QWidget
{
    Q_OBJECT
public:
    explicit MainWidget(QWidget *parent = 0);

    void setLanguage(LANGUAGE current_language);
    void setTranslator(QTranslator * translator);

protected:
    void changeEvent(QEvent *event);
signals:

public slots:
private slots:
    void showSetting();
    void switchLanguage(LANGUAGE language);
private :
    void translateUI();

    QLabel * welcome_label;
    QPushButton *setting_button;
    QPushButton *ok_button;
    QPushButton *cancel_button;

    SettingDialog *setting_diaog;
    LANGUAGE current_language;
    QTranslator * translate;
};

#endif // MAINWIDGET_H
